package com.edu.design.decorator;

public class DecoratorTest {
	
	public static void othors(){
		Humburger humburger = new baseHumburger();
		System.out.println(humburger.getName()+",单价："+humburger.getPrice());
		
		Humburger lettuce = new Lettuce(humburger);
		System.out.println(lettuce.getName()+",单价："+lettuce.getPrice());
		
		Humburger chilli = new Chilli(humburger);
		System.out.println(chilli.getName()+",单价："+chilli.getPrice());
	}
	
	public static void all(){
		Humburger humburger = new Chilli(new Lettuce(new baseHumburger()));
		System.out.println(humburger.getName()+",单价："+humburger.getPrice());
	}
	
	public static void main(String[] args) {
		othors();
		all();
	}

}
